type info ={
  name:string,
  friend?:{
    name:string,
    girlFriend?:{
      name:string
    }
  }
}
const pcc :info = {
  name:'pcc',
  friend:{
    name:'yyy',
    girlFriend:{
      name:'ppp'
    }
  }
}

//另一个文件中
console.log(pcc.name);
// console.log(pcc.friend!.name);
console.log(pcc.friend?.name);


